package com.heima.feign.article;

import com.heima.feign.article.fallback.ArticleClientFallback;
import com.heima.model.common.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author Lijx
 * @Date 2024-07-23 15:52
 */
@FeignClient(value = "leadnews-article",fallback = ArticleClientFallback.class)
public interface IApArticleClient {

    /**
     * 保存或者修改文章信息
     * @param articleDto
     * @return
     */
    @PostMapping("/api/v1/article/sync")
     ResponseResult saveOrUpdate(@RequestBody ArticleDto articleDto);
}
